﻿namespace ECommerce.AuthService.Models;

/// <summary>
/// JWT配置模型，映射appsettings.json中的Jwt节点
/// </summary>
public class JwtSettings
{
    /// <summary>
    /// 令牌签发者（通常是认证服务的URL）
    /// </summary>
    public string Issuer { get; set; } = string.Empty;

    /// <summary>
    /// 令牌受众（通常是网关或客户端的URL）
    /// </summary>
    public string Audience { get; set; } = string.Empty;

    /// <summary>
    /// 签名密钥（必须至少16个字符）
    /// </summary>
    public string Secret { get; set; } = string.Empty;

    /// <summary>
    /// 令牌过期分钟数
    /// </summary>
    public int ExpiryMinutes { get; set; } = 60;
    public double RefreshTokenExpiryDays { get;  set; } = 7;
}
